<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:p="http://primefaces.org/ui" template="../templates/ui.xhtml">

	<ui:define name="content">
		<h:form id="orderConfirmForm" prependId="false">

			<h:outputText value="Order Confirmed #{checkOut.orderId }" />
			<h:panelGrid columns="3">
			check your Order <h:link value="Status " outcome="orderStatus">
					<f:param name="oid" value="#{checkOut.orderId }" />
				</h:link> here 
			</h:panelGrid>
			<h:outputText
				value="download the Order slip by clicking the image below" />
			<p:panelGrid columns="2" style="width:100%;">
				<h:graphicImage value="/images/logo.png" style="width:25%;" />

				<h:outputText escape="false" style="float:right; width:75%;"
					value="Product Company Name   &lt;br/&gt;
							   Hyderabad - 500624, Andhra Pradesh, India.&lt;br/&gt;  
							   Telephone No. : 9999999999 &lt;br/&gt;
							   e-Mail : bmahesh.nitd@gmail.com &lt;br/&gt;
							   Homepage : http://www.comapnywebsite.com &lt;br/&gt;" />

			</p:panelGrid>
			<p:panelGrid columns="4" style="width:100%;" >
				<h:outputText value="Order No :" styleClass="labelText"/>
				<h:outputText value="#{checkOut.orderId }" />
				<h:outputText value="Address :" styleClass="labelText"/>
				<h:outputText value="#{registration.houseNo }" />
				<h:outputText value="Name of the Person :" styleClass="labelText"/>
				<h:outputText value="#{registration.name }" />
				<h:outputText value="" />
				<h:outputText value="#{registration.street} #{registration.area }" />
				
				<h:outputText value="Date of Order :" styleClass="labelText"/>
				<h:outputText value="#{cart.dateOfOrder}" />
				<h:outputText value="" />
				<h:outputText value="#{registration.landmark }" />
			</p:panelGrid>


			<p:dataTable value="#{cart.cartItemsList}" var="items"
				rendered="#{fn:length(cart.cartItemsList) gt 0}"
				emptyMessage="No Items Found" styleClass="cart-dataList"
				id="cartItemsGrid" type="definition">
				<p:column headerText="S.No">
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Name" />
					</f:facet>
					<h:outputText
						value="#{items.brand} #{items.itemName}  #{items.size }" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Quantty" />
					</f:facet>
					<h:outputText value="#{items.qty}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Price" />
					</f:facet>
					<h:outputText value="#{items.price}" />
				</p:column>
				<p:columnGroup type="footer">
						<p:row>
							<p:column colspan="3" footerText="Shipping:"
								style="text-align:right" />
							<p:column footerText="#{cart.shippingCharges}" colspan="2" style="text-align:left"/>
						</p:row>
						<p:row>
							<p:column colspan="3" footerText="Sub Total:"
								style="text-align:right" />
							<p:column footerText="#{cart.subTotal}" colspan="2" style="text-align:left"/>
						</p:row>
						<p:row>
							<p:column colspan="3" footerText="Total Amount Payable:"
								style="text-align:right" />
							<p:column footerText="#{cart.total}" colspan="2" style="text-align:left"/>
						</p:row>

					</p:columnGroup>
				<p:separator />
			</p:dataTable>
			<!--<h:panelGrid columns="2" styleClass="cart-smallGrid">
				<h:outputLabel value="Shipping:" styleClass="cart-smallGridText" />
				<h:outputText value="#{cart.shippingCharges}"
					styleClass="cart-smallGridPrice" />
				<h:outputLabel value="Sub Total:" styleClass="cart-smallGridText" />
				<h:outputText value="#{cart.subTotal }"
					styleClass="cart-smallGridPrice" />
				<h:outputLabel value="Total Amount Payable:"
					styleClass="cart-smallGridText" />
				<h:outputText value="#{cart.total }"
					styleClass="cart-smallGridPrice" />
			</h:panelGrid>
			--><h:commandLink style="float:right;margin-right:30px;">
				<h:graphicImage value="/images/pdf.png" />
				<p:dataExporter target="cartItemsGrid" type="pdf" fileName="cart"
					preProcessor="#{cart.preProcessPDF}" />
			</h:commandLink>
		</h:form>

	</ui:define>
</ui:composition>
